<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">

<h:head>
	<title>Bienvenido a escool</title>
	<style type="text/css">
	
	
	body{
		font: 62.5% "Trebuchet MS", sans-serif;
		margin: 50px
	}
datalist-noborder,.ui-layout,.ui-layout-doc,.ui-layout-unit,.ui-layout-wrap,.ui-layout-bd,.ui-layout-hd,.ui-menu
	{
	border: none;
}

.dp-xml .cdata {
	color: #ff1493;
}

.dp-xml .tag,.dp-xml .tag-name {
	color: #069;
	font-weight: bold;
}

.dp-xml .attribute {
	color: red;
}

.dp-xml .attribute-value {
	color: blue;
}

.ui-widget-content .ui-datalist-content {
	border: none;
	background: transparent;
	background-image: none;
}


</style>
</h:head>

<body>

	<p:layout id="full" fullPage="true">
<p:ajaxStatus onstart="statusDialog.show();" onsuccess="statusDialog.hide();"/>                
<p:dialog modal="true" widgetVar="statusDialog"    
        draggable="false" closable="false">  
    <p:graphicImage value="resources/img/bar_loader.gif" />  
</p:dialog>  
		<p:layoutUnit id="top" position="north" size="75">
			<p:toolbar>
				<p:toolbarGroup align="left">
					 		Bienvenido <h:outputText value="#{alumnoTabMenuBeam.usuario.id.nombreCompleto}" />
					 </p:toolbarGroup>
				<p:toolbarGroup align="right">
					<p:commandLink value="Logout"  action="#{loginMgmtBean.logout()}"  />  | 
				</p:toolbarGroup>
			</p:toolbar>
		</p:layoutUnit>

		<p:layoutUnit id="bottom" position="south" size="60">
                    Escool S.A.
                </p:layoutUnit>

		<p:layoutUnit id="left" position="west" size="215" resizable="false"
			closable="false" collapsible="false" minSize="200">
			<p:graphicImage style="width:200px"
				value="resources/img/logo-escuela.jpg" />
			
<h:form id="form">
				<br />
				<br />
				<p:menu style="width:200;boder:none">
					<p:submenu label="Favoritos" style="width:200;boder:none">
						
						<p:menuitem action="#{menuSeccitonMateria.goSendMail}"
							icon="ui-icon ui-icon-mail-closed" value="Crear Mensaje" />
					</p:submenu>
				</p:menu>
			</h:form>

			
				<h4 style="width: 200px;" align="left"
					class="title ui-widget-header ui-corner-all">Materias</h4>
			
			<div class="datalist-noborder">
				<p:dataList value="#{alumnoTabMenuBeam.materiasAlumno}" var="mat"
					itemType="none">
					<p:commandLink
						action="#{menuSeccitonMateria.getContentNotas(mat)}">#{mat.id.nombreMateria}</p:commandLink>
				</p:dataList>
				
			</div>


			<h4 class="title ui-widget-header ui-corner-all">Mi Información</h4>


		</p:layoutUnit>


		<p:layoutUnit id="center" position="center">
		<h:form id="formTab">

				
					<p:tabMenu activeIndex="#{alumnoTabMenuBeam.activeindex}">  
		    <p:menuitem value="Tareas"   action="#{alumnoTabMenuBeam.Dirige(0)}" />
		    <p:menuitem value="Actividades"    action="#{alumnoTabMenuBeam.Dirige(1)}" /> 
		    <p:menuitem value="Mensajes"   action="#{alumnoTabMenuBeam.Dirige(2)}"/> 
		    <p:menuitem value="Calificaciones"    action="#{alumnoTabMenuBeam.Dirige(3)}"/>
		  </p:tabMenu> 

<p:scrollPanel mode="native" style="height: 450px; width:auto;">

<p:panel  header="Tareas pendientes" style="width:980px" 
							toggleable="true" >
							<p:dataTable var="tarea" value="#{alumnoTabMenuBeam.listNotasPendientes}" 
								paginator="true" rows="10" paginatorPosition="top"
								paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
								rowsPerPageTemplate="5,10,15" 
									>
								<p:column headerText="Asunto">
									<h:outputText value="#{tarea.id.asunto}" />
								</p:column>
								<p:column headerText="Materia">
									<h:outputText value="#{tarea.id.nombreMateria}" />
								</p:column>
								<p:column headerText="Fecha de entrega">
									<h:outputText  value="#{tarea.id.fechaEntrega}" >
										<f:convertDateTime type="date" dateStyle="medium" timeZone="GMT+1:00" />										
									</h:outputText>
								</p:column>
								<p:column >
									<p:commandButton icon="ui-icon-search" action="#{tareaList.verTarea(tarea)}" />
								</p:column>
																		
							</p:dataTable>
						</p:panel>
						
						<p:panel  header="Tareas atrasadas" style="width:980px" 
							toggleable="true" collapsed="true">
							<p:dataTable var="tarea" value="#{alumnoTabMenuBeam.listNotasAtrasadas}" 
								paginator="true" rows="10" paginatorPosition="top"
								paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
								rowsPerPageTemplate="5,10,15" 
									>
								<p:column headerText="Asunto">
									<h:outputText value="#{tarea.id.asunto}" />
								</p:column>
								<p:column headerText="Materia">
									<h:outputText value="#{tarea.id.nombreMateria}" />
								</p:column>
								<p:column headerText="Fecha de entrega">
									<h:outputText  value="#{tarea.id.fechaEntrega}" >
										<f:convertDateTime type="date" dateStyle="medium" timeZone="GMT+1:00" />										
									</h:outputText>
								</p:column>
								<p:column >
									<p:commandButton icon="ui-icon-search" action="#{tareaList.verTarea(tarea)}" />
								</p:column>
																		
							</p:dataTable>
						</p:panel>





<p:panel  header="Tareas enviadas" style="width:980px" 
							toggleable="true" collapsed="true">
							<p:dataTable var="tarea" value="#{alumnoTabMenuBeam.listNotasEnviadas}" 
								paginator="true" rows="10" paginatorPosition="top"
								paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
								rowsPerPageTemplate="5,10,15" 
									>
								<p:column headerText="Asunto">
									<h:outputText value="#{tarea.id.asunto}" />
								</p:column>
								<p:column headerText="Materia">
									<h:outputText value="#{tarea.id.nombreMateria}" />
								</p:column>
								<p:column headerText="Fecha de entrega">
									<h:outputText  value="#{tarea.id.fechaEntrega}" >
										<f:convertDateTime type="date" dateStyle="medium" timeZone="GMT+1:00" />										
									</h:outputText>
								</p:column>
								<p:column >
									<p:commandButton icon="ui-icon-search" action="#{tareaList.verTarea(tarea)}" />
								</p:column>
																		
							</p:dataTable>
						</p:panel>


</p:scrollPanel>
		</h:form>
		
		</p:layoutUnit>

	</p:layout>
</body>
</html>
